
<div class="border d-flex justify-content-between">
  <a href="<%%= url_for :action => :show, :id => @<%= name.downcase %>.object %>" class="m-1 btn btn-secondary btn-sm">Cancel</a>

  <h3>Edit <%%= @<%= name.downcase %>.<%= attributes[0] %> %></h3>

  <a href="<%%= url_for :action => :delete, :id => @<%= name.downcase %>.object %>" class="m-1 btn btn-danger btn-sm">Delete</a>

</div>

<div class="container-fluid">

  <form method="POST" action="<%%= url_for :action => :update %>">
    <input type="hidden" name="id" value="<%%= @<%= name.downcase %>.object %>"/>

    <% attributes.each do |attribute| %>
        <div class="form-group">
          <label for="<%= name.downcase %>[<%= attribute %>]"><%= attribute.humanize() %></label>
          <input type="text" id="<%= name.downcase %>[<%= attribute %>]" name="<%= name.downcase %>[<%= attribute %>]" value="<%%= @<%= name.downcase %>.<%= attribute %> %>" <%%= placeholder( "<%= attribute.humanize() %>" ) %> class="form-control" />
        </div>
    <% end %>
    <button type="submit" class="btn btn-success btn-block">Update</button>
  </form>

</div>
